home *** CD-ROM | disk | FTP | other *** search
- if(mode == 0)
- {
- if(mp < tpause)
- {
- mp++;
- }
- else
- {
- mode = 1;
- }
- pek = mp / tpause;
- wi = int((movx - lx - rx) * pek);
- hi = int((movy - ty - by) * pek);
- i = 0;
- while(i < ii - 1)
- {
- x1 = int((lx + i * wi / ii) * pek);
- x2 = int((lx + (i + 1) * wi / ii) * pek);
- y1 = movy - ty - int((movy - by - ty) * vals[i] / p100);
- y2 = movy - ty - int((movy - by - ty) * vals[i + 1] / p100);
- setProperty(i, _width, 1000);
- setProperty(i, _rotation, 0);
- kx = x1 - x2;
- ky = y1 - y2;
- dist = Math.sqrt(kx * kx + ky * ky);
- dist = dist != 0 ? dist : 1;
- rot = 57.29577951308232 * Math.acos(kx / dist);
- rot = y1 >= y2 ? rot - 180 : 180 - rot;
- setProperty(i, _X, x1);
- setProperty(i, _Y, y1);
- setProperty(i, _width, dist);
- setProperty(i, _rotation, rot);
- setProperty(i, _visible, true);
- setProperty("t" add i, _X, x1);
- setProperty("t" add i, _Y, y1);
- setProperty("t" add i, _xscale, pek * 100);
- setProperty("t" add i, _alpha, 100);
- setProperty("t" add i, _visible, true);
- setProperty("p" add i, _X, x1);
- setProperty("p" add i, _Y, y1);
- setProperty("p" add i, _alpha, 100);
- setProperty("p" add i, _visible, true);
- i++;
- }
- setProperty("p" add i, _X, x2);
- setProperty("p" add i, _Y, y2);
- setProperty("p" add i, _alpha, 100);
- setProperty("p" add i, _visible, true);
- setProperty("t" add i, _X, x2);
- setProperty("t" add i, _Y, y2);
- setProperty("t" add i, _xscale, pek * 100);
- setProperty("t" add i, _alpha, 100);
- setProperty("t" add i, _visible, true);
- }
- else if(mode == 1)
- {
- if(0 < mp)
- {
- mp--;
- }
- else
- {
- mode = 2;
- }
- i = 0;
- while(i < ii)
- {
- eval(i)._alpha = mp * 100 / tpause;
- i++;
- }
- }
- else if(mode == 2)
- {
- if(mp < tpause)
- {
- mp++;
- }
- else
- {
- mode = 3;
- }
- wi = int(movx - lx - rx);
- hi = int(movy - ty - by);
- i = 0;
- while(i < ii - 1)
- {
- pek = mp / tpause - i / ii;
- if(pek < 0)
- {
- pek = 0;
- }
- else
- {
- pek *= ii;
- }
- if(1 < pek)
- {
- pek = 1;
- }
- x1 = int(lx + i * wi / ii);
- x2 = int(lx + (i + 1) * wi / ii);
- y1 = movy - ty - int((movy - by - ty) * vals[i] / p100);
- y2 = movy - ty - int((movy - by - ty) * vals[i + 1] / p100);
- setProperty(i, _width, 1000);
- setProperty(i, _rotation, 0);
- kx = x1 - x2;
- ky = y1 - y2;
- dist = Math.sqrt(kx * kx + ky * ky);
- dist = dist != 0 ? dist : 1;
- rot = 57.29577951308232 * Math.acos(kx / dist);
- rot = y1 >= y2 ? rot - 180 : 180 - rot;
- setProperty(i, _X, x1);
- setProperty(i, _Y, y1);
- setProperty(i, _width, dist * pek);
- setProperty(i, _rotation, rot);
- setProperty(i, _alpha, 100);
- i++;
- }
- }
- else if(mode == 3)
- {
- if(0 < mp)
- {
- mp--;
- }
- else
- {
- mode = 2;
- }
- wi = int(movx - lx - rx);
- hi = int(movy - ty - by);
- i = 0;
- while(i < ii - 1)
- {
- pek = mp / tpause - (ii - i - 1) / ii;
- if(pek < 0)
- {
- pek = 0;
- }
- else
- {
- pek *= ii;
- }
- if(1 < pek)
- {
- pek = 1;
- }
- x2 = int(lx + i * wi / ii);
- x1 = int(lx + (i + 1) * wi / ii);
- y2 = movy - ty - int((movy - by - ty) * vals[i] / p100);
- y1 = movy - ty - int((movy - by - ty) * vals[i + 1] / p100);
- setProperty(i, _width, 1000);
- setProperty(i, _rotation, 0);
- kx = x1 - x2;
- ky = y1 - y2;
- dist = Math.sqrt(kx * kx + ky * ky);
- dist = dist != 0 ? dist : 1;
- rot = 57.29577951308232 * Math.acos(kx / dist);
- rot = y1 >= y2 ? rot - 180 : 180 - rot;
- setProperty(i, _X, x1);
- setProperty(i, _Y, y1);
- setProperty(i, _width, dist * pek);
- setProperty(i, _rotation, rot);
- setProperty(i, _alpha, 100);
- i++;
- }
- }
-